/*
 * Copyright (c) 2018. czmc All Rights Reserved.
 * Author: czmc
 * Email: zxc6355533@163.com
 * Encoding: UTF-8
 */

package top.stime21.myneighbours.module.myneed

import android.os.Bundle
import android.support.v7.app.AppCompatActivity
import kotlinx.android.synthetic.main.activity_my_need.*
import kotlinx.android.synthetic.main.include_header.*
import top.stime21.myneighbours.R

class MyNeedActivity : AppCompatActivity() {

    override fun onCreate(savedInstanceState: Bundle?) {
        super.onCreate(savedInstanceState)
        setContentView(R.layout.activity_my_need)
       var data = intent.getSerializableExtra("data")
        btn_back.setOnClickListener({finish()})
        tv_title.setText("我的记录")
        viewPager.adapter = MyNeedAdapter(supportFragmentManager)
        viewPager.offscreenPageLimit=3
        tabLayout.setupWithViewPager(viewPager)
        if(data!=null){
            viewPager.currentItem = data as Int
        }
    }
}
